const baseUrl = "https://XXX"
export const myRequest = (options) =>{
	return new Promise((resolve,reject) =>{
		uni.request({
			method:options.method,
			data:options.data,
			url:baseUrl + options.url,
			success(res) {
				if(res.errorCode !== 0){
					return uni.showToast({
						title:"获取数据失败"
					})
				}
				resolve(res)
			},
			fail(err) {
				uni.showToast({
					title:'获取数据失败'
				})
				reject(err)
			}
		})
	})
}